"""
WSGI config for NICU2HOME project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""

import os
import time

from django.core.wsgi import get_wsgi_application
from Common.logger import app_log

from NICU2HOME.settings import Environment
from Schedule.cron_job import ScheduleManager

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'NICU2HOME.settings')

application = get_wsgi_application()

app_log.info('==========================================')
app_log.info('┇ service started with config:{}'.format(Environment))
app_log.info('┇ service local ip: 0.0.0.0')
app_log.info('┇ service local port: 8000')
app_log.info('┇ service started at:{}'.format(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))))
app_log.info('==========================================')

# ScheduleManager().init_tasks()
